<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>prometheus-client-c: prom/include/prom_metric.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">prometheus-client-c
   &#160;<span id="projectnumber">0.1.1</span>
   </div>
   <div id="projectbrief">Prometheus client for the C programming language</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_2c63f04010e7ff462eba5e344f58cd21.html">prom</a></li><li class="navelem"><a class="el" href="dir_83821d63a26a6eb889c4977bd95ca990.html">include</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">prom_metric.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="prom__metric_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment">Copyright 2019-2020 DigitalOcean Inc.</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment">Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment">you may not use this file except in compliance with the License.</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment">You may obtain a copy of the License at</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment">     http://www.apache.org/licenses/LICENSE-2.0</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment">Unless required by applicable law or agreed to in writing, software</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment">distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment">WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment">See the License for the specific language governing permissions and</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment">limitations under the License.</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment">*/</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="preprocessor">#ifndef PROM_METRIC_H</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#define PROM_METRIC_H</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="prom__metric__sample_8h.html">prom_metric_sample.h</a>&quot;</span></div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="prom__metric__sample__histogram_8h.html">prom_metric_sample_histogram.h</a>&quot;</span></div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="keyword">struct </span>prom_metric;</div><div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="prom__metric_8h.html#afd1bd014c48955d6c2c36aa8a8cbb889">   34</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span>prom_metric <a class="code" href="prom__metric_8h.html#afd1bd014c48955d6c2c36aa8a8cbb889">prom_metric_t</a>;</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;<a class="code" href="prom__metric__sample_8h.html#a0fb9ff851bf9ee126756ae826a2ce72a">prom_metric_sample_t</a> *<a class="code" href="prom__metric_8h.html#a2c33d7e03b430a2903bf122fbeeb89de">prom_metric_sample_from_labels</a>(<a class="code" href="prom__metric_8h.html#afd1bd014c48955d6c2c36aa8a8cbb889">prom_metric_t</a> *<span class="keyword">self</span>, <span class="keyword">const</span> <span class="keywordtype">char</span> **label_values);</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;<a class="code" href="prom__metric__sample__histogram_8h.html#aed3455bc4eec61a3d8f01e6c1af84f9f">prom_metric_sample_histogram_t</a> *<a class="code" href="prom__metric_8h.html#a3b76680b4a7177eebc864f3b3be1e935">prom_metric_sample_histogram_from_labels</a>(<a class="code" href="prom__metric_8h.html#afd1bd014c48955d6c2c36aa8a8cbb889">prom_metric_t</a> *<span class="keyword">self</span>,</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;                                                                         <span class="keyword">const</span> <span class="keywordtype">char</span> **label_values);</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;<span class="preprocessor">#endif  // PROM_METRIC_H</span></div><div class="ttc" id="prom__metric_8h_html_afd1bd014c48955d6c2c36aa8a8cbb889"><div class="ttname"><a href="prom__metric_8h.html#afd1bd014c48955d6c2c36aa8a8cbb889">prom_metric_t</a></div><div class="ttdeci">struct prom_metric prom_metric_t</div><div class="ttdoc">A prometheus metric. </div><div class="ttdef"><b>Definition:</b> prom_metric.h:34</div></div>
<div class="ttc" id="prom__metric__sample_8h_html"><div class="ttname"><a href="prom__metric__sample_8h.html">prom_metric_sample.h</a></div><div class="ttdoc">Functions for interfacting with metric samples directly. </div></div>
<div class="ttc" id="prom__metric__sample__histogram_8h_html_aed3455bc4eec61a3d8f01e6c1af84f9f"><div class="ttname"><a href="prom__metric__sample__histogram_8h.html#aed3455bc4eec61a3d8f01e6c1af84f9f">prom_metric_sample_histogram_t</a></div><div class="ttdeci">struct prom_metric_sample_histogram prom_metric_sample_histogram_t</div><div class="ttdoc">A histogram metric sample. </div><div class="ttdef"><b>Definition:</b> prom_metric_sample_histogram.h:29</div></div>
<div class="ttc" id="prom__metric_8h_html_a3b76680b4a7177eebc864f3b3be1e935"><div class="ttname"><a href="prom__metric_8h.html#a3b76680b4a7177eebc864f3b3be1e935">prom_metric_sample_histogram_from_labels</a></div><div class="ttdeci">prom_metric_sample_histogram_t * prom_metric_sample_histogram_from_labels(prom_metric_t *self, const char **label_values)</div><div class="ttdoc">Returns a prom_metric_sample_histogram_t*. </div></div>
<div class="ttc" id="prom__metric__sample_8h_html_a0fb9ff851bf9ee126756ae826a2ce72a"><div class="ttname"><a href="prom__metric__sample_8h.html#a0fb9ff851bf9ee126756ae826a2ce72a">prom_metric_sample_t</a></div><div class="ttdeci">struct prom_metric_sample prom_metric_sample_t</div><div class="ttdoc">Contains the specific metric and value given the name and label set Reference: https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels. </div><div class="ttdef"><b>Definition:</b> prom_metric_sample.h:30</div></div>
<div class="ttc" id="prom__metric__sample__histogram_8h_html"><div class="ttname"><a href="prom__metric__sample__histogram_8h.html">prom_metric_sample_histogram.h</a></div><div class="ttdoc">Functions for interacting with histogram metric samples directly. </div></div>
<div class="ttc" id="prom__metric_8h_html_a2c33d7e03b430a2903bf122fbeeb89de"><div class="ttname"><a href="prom__metric_8h.html#a2c33d7e03b430a2903bf122fbeeb89de">prom_metric_sample_from_labels</a></div><div class="ttdeci">prom_metric_sample_t * prom_metric_sample_from_labels(prom_metric_t *self, const char **label_values)</div><div class="ttdoc">Returns a prom_metric_sample_t*. </div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
